﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyWpfFramework.ViewModels
{
    public class TemplateViewModel
    {
        public ObservableCollection<Person> People { get; set; }
        public TemplateViewModel()
        {
            // 设置数据源
            People = new ObservableCollection<Person>
            {
                new Person { Name = "Alvin", Age = 30, Country = true },
                new Person { Name = "Tom", Age = 25, Country = false },
                new Person { Name = "Lisa", Age = 28, Country = true }
            };
        }
    }

    public class Person
    {
        public string Name { get; set; }
        public int Age { get; set; }
        public bool Country { get; set; }
    }

}
